@extends('layouts.main')
@section('title')
订单详情
@endsection
@section('othercss')
<style>
    body{
        background-color:#F4F4F4
    }
    .order_detail{
        background-color:#FFFFFF;
        margin: 20px;
        border-radius:5px;
        box-shadow: 2px 2px 3px #aaaaaa;
    }
    .line{
        background-color:#E3E3E3;
        width:100%;
        height:1px;
        margin: 0 auto;
        overflow: hidden
    }
    .pay_state{
        width:100%; 
        height:50px;
        position: absolute;
        bottom: 0px;
        text-align:center;
        background-color: #3E456C;
    }
    .center{
        position: absolute;
        top:0;
        left:0;
        bottom:0;
        right:0;
        width:50%;
        height:50%;
        margin:auto;
    }
</style>
<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
@endsection
@section('content')
<div class="order_detail">
    <div style="padding: 20px">
        <div style="font-size: 15pt">订单号:&nbsp;{{$order_num}}</div>
        <div style="margin-top: 10px;color:#999999">7月9日 19:30</div><br>
        <table style="border-collapse:collapse;width: 100%;">
            <thead>
                <tr style="border-bottom:solid 1px #E3E3E3;">
                    <th>商品名称</th>
                    <th>价格</th>
                    <th>数量</th>
                </tr>
            </thead>
            <tbody style="color: #999999">
                @foreach($orderList as $key=>$orderinfo)
                <tr>
                    <td>@if($key==0)<br>@endif{{$orderinfo['goods_name']}}<br><br></td>
                    <td>@if($key==0)<br>@endif{{$orderinfo['goods_subtotal']}}<br><br></td>
                    <td>@if($key==0)<br>@endif{{$orderinfo['goods_subamount']}}<br><br></td>
                </tr>
                @endforeach
            </tbody>
        </table>
        <div style="margin-top:15px" class="line"></div>
        <div style="float: left;margin-top:10px;font-size:15pt">
            实付款
        </div>
        <div style="float: right;margin-top:10px;font-size:15pt">
            ￥{{round($total,2)}}
        </div>
        <div style="clear: both"></div>
    </div>
</div>
<div class="pay_state">
    @if($isPay)
    <div class="center" style="color: white">已付款</div>
    @else
    <div class="center" onclick="location.href='/order_list?order_id={{$order_id}}'" style="color: white">去付款</div>
    @endif
</div>
@endsection
